export const constandroutes = [
  //登录
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login/index.vue'),
    meta: {
      name: '登录',
      visible: false,
      icon: 'Tools',
    },
  },
  //首页
  {
    path: '/',
    component: () => import('@/views/Layout/index.vue'),
    redirect: '/home',
    name: 'default',
    meta: {
      name: '主页',
      visible: true,
      icon: 'House',
    },
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/Home/index.vue'),
        meta: {
          name: '',
          visible: false,
          icon: 'House',
        },
      },
    ],
  },
  //仪表盘
  {
    path: '/bashboard',
    name: 'bashboard',
    component: () => import('@/views/Dashboard/index.vue'),
    meta: {
      name: '数据大屏',
      visible: true,
      icon: 'PieChart',
    },
  },
  //权限管理
  {
    path: '/rm',
    component: () => import('@/views/Layout/index.vue'),
    name: 'RM',
    redirect: '/rm/usermanage',
    meta: {
      name: '权限管理',
      visible: true,
      icon: 'Lock',
    },
    children: [
      {
        path: '/rm/usermanage',
        name: 'usermanage',
        component: () => import('@/views/RM/UserManage/index.vue'),
        meta: {
          name: '用户管理',
          visible: true,
          icon: 'User',
        },
      },
      {
        path: '/rm/rolemanage',
        name: 'rolemanage',
        component: () => import('@/views/RM/RoleManage/index.vue'),
        meta: {
          name: '角色管理',
          visible: true,
          icon: 'UserFilled',
        },
      },
      {
        path: '/rm/menumanage',
        name: 'menumanage',
        component: () => import('@/views/RM/MenuManage/index.vue'),
        meta: {
          name: '菜单管理',
          visible: true,
          icon: 'Menu',
        },
      },
    ],
  },
  //商品管理
  {
    path: '/sm',
    component: () => import('@/views/Layout/index.vue'),
    name: 'SM',
    redirect: '/sm/brandmanage',
    meta: {
      name: '商品管理',
      visible: true,
      icon: 'ShoppingCart',
    },
    children: [
      {
        path: '/sm/brandmanage',
        name: 'brandmanage',
        component: () => import('@/views/SM/BrandManage/index.vue'),
        meta: {
          name: '品牌管理',
          visible: true,
          icon: 'Orange',
        },
      },
      {
        path: '/sm/propertymanage',
        name: 'propertymanage',
        component: () => import('@/views/SM/PropertyManage/index.vue'),
        meta: {
          name: '属性管理',
          visible: true,
          icon: 'Box',
        },
      },
      {
        path: '/sm/spumanage',
        name: 'spumanage',
        component: () => import('@/views/SM/SPUManage/index.vue'),
        meta: {
          name: 'SPU管理',
          visible: true,
          icon: 'ShoppingBag',
        },
      },
      {
        path: '/sm/skumanage',
        name: 'skumanage',
        component: () => import('@/views/SM/SKUManage/index.vue'),
        meta: {
          name: 'SKU管理',
          visible: true,
          icon: 'Goods',
        },
      },
    ],
  },
  //404
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/404/index.vue'),
    meta: {
      name: '404',
      visible: false,
      icon: 'Calendar',
    },
  },
  //通配
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    meta: {
      name: '任意路由',
      visible: false,
      icon: 'Edit',
    },
  },
]

export const asyncRoutes = []
